﻿using System.Web.Configuration;

namespace YerongapillyGreens.Web.Extensions
{
    public static class Config
    {
        private static string ReadConfig(string configValue)
        {
            if (WebConfigurationManager.AppSettings[configValue] != null)
                return WebConfigurationManager.AppSettings[configValue].ToString();
            else
                return null;
        }

        public static string SMTPServer
        {
            get { return ReadConfig("smtpServer"); }
        }

        public static string SMTPServerPort
        {
            get { return ReadConfig("smtpServerPort"); }
        }

        public static string SMTPUsername
        {
            get { return ReadConfig("smtpUserName"); }
        }

        public static string SMTPPassword
        {
            get { return ReadConfig("smtpPassword"); }
        }

        public static string MailToSales
        {
            get { return ReadConfig("mailToSales"); }
        }

        public static string MailToRental
        {
            get { return ReadConfig("mailToRental"); }
        }

    }
}
